package com.hodgepodge.commons.validator.annotation;

import com.hodgepodge.commons.validator.constraint.FixedNumValuesValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * title FixedValues
 * projectName colorful-blog
 * desc 固定数字值注解
 *
 * @author jiangjian
 * @date 2021/6/2 17:17
 */
@Target({ElementType.PARAMETER, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = FixedNumValuesValidator.class)
public @interface FixedNumValues {

    int[] values() default {};

    String message() default "只能传入规定值";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
